source("/Volumes/web-1/bivalvia/course materials/biostats.R")
library(vegan)#
library(permute)#
library(simba)#
library(cluster)#
library(ecodist)#
library(fields)#
library(pastecs)#
library(boot)
all<-read.csv("ExpressedGeneStats_varsubset.csv",header=T,row.names=1,na.strings='NA')
all<-read.csv("ExpressedGeneStats_varsubset.csv",header=T,row.names=1,na.strings='NA')
all<-read.csv("ExpressedGeneStats_varsub.csv",header=T,row.names=1,na.strings='NA')
head(all)
hist(all)
hist.plots(all)
()
()
uv.plots(all)
all2<-all[,c(7,8,9,10,11,12)]
head(all2)
genedes.pca<-prcomp(all2,scale=TRUE)
summary(genedes.pca)
gendes.eig<-genedes.pca$sdev^2
gendes.eig
pca.eigenval(genedes.pca)
ordi.monte(all2.log,ord='pca',dim=5)
ordi.monte(all2,ord='pca',dim=5)
genedes.pca$rotation
pca.eigenvec(genedes.pca,dim=5,digits=3,cutoff=0.05)
pca.structure(genedes.pca,all2,dim=5,cutoff=0.5)
fig<-ordiplot(genedes.pca,choices=c(1,2),display='sites',xlab="PC 1 (50.2%)", ylab="PC 2 (26.1%)",col='purple')
fig<-ordiplot(genedes.pca,choices=c(1,2),type='none',display='sites',xlab="PC 1 (50.2%)", ylab="PC 2 (26.1%)")
fig<-ordiplot(genedes.pca,choices=c(1,2),type='none',display='sites',xlab="PC 1 (50.2%)", ylab="PC 2 (26.1%)")
arrows(0,0,genedes.pca$rotation[,1]*4,genedes.pca$rotation[,2]*4,col='purple')
text(genedes.pca$rotation[,1]*4.2,genedes.pca$rotation[,2]*4.2,row.names(genedes.pca$rotation))
fig<-ordiplot(genedes.pca,choices=c(1,2),type='none',display='sites',xlab="PC 1 (50.2%)", ylab="PC 2 (26.1%)")
arrows(0,0,genedes.pca$rotation[,1]*6,genedes.pca$rotation[,2]*6,col='purple')
text(genedes.pca$rotation[,1]*4.2,genedes.pca$rotation[,2]*4.2,row.names(genedes.pca$rotation))
fig<-ordiplot(genedes.pca,choices=c(1,2),display='sites',xlab="PC 1 (50.2%)", ylab="PC 2 (26.1%)",col='purple')
fig<-ordiplot(genedes.pca,choices=c(1,2),display='sites',xlab="PC 1 (50.2%)", ylab="PC 2 (26.1%)")
